import random 
num = random.randint(0,10)
a = "\nI chose a number form 1 to 10,can you guess it in three times?"
a += "\nIf you admit you can't do,enter 'loser' to quit it."
print(a)
times = 0
while times < 3:
    b = input("Now,show me your answer!")
    if b == "loser":
        print("Emmm.You are turly loser.")
        times = 3
    elif int(b) == num:
        print("You win!")
        times = 3
        break
    elif int(b) != num :
        if times < 1:
            print("No No NO!Try it again!")
            times += 1
        elif times == 2:
            print("You lose!")
            times += 1
        else:
            print("You only have the last chance,please think about carefully!")
            times += 1
if times == 3:
    print("The game is over!")    
